<style>
  .validata-customer {
    background-color: rgba(0, 0, 0, 0.5);
    position: fixed;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 999;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .validata-control {
    width: 400px;
    border-radius: 4px;
    background-color: #fff;
    text-align: center;
    overflow: hidden;
    position: relative;
  }

  .validata-control .close {
    position: absolute;
    right: 0;
    top: 0;
    width: 40px;
    height: 40px;
    line-height: 40px;
  }

  .validata-control h3 {
    font-size: 16px;
    color: #565e99;
    font-weight: bold;
  }

  .validata-control p {
    padding: 40px 0 53px;
  }

  .blue-button {
    background-color: #565e99;
    color: #fff;
    line-height: 50px;
  }

  .gray-button {
    background-color: #f2f2f2;
    line-height: 50px;
    color: #666
  }
</style>

<section class="businessCreate mlr-24">
  <div class="font-16 line-height-56 border-b color-666">编辑线索</div>
  <div class="font-14 color-gray mt-10">主要信息</div>
  <div>
    <div class="dy-flex line-height-34 mt-10">
      <div class="dy-fx-1"><span class="required">*</span>主题:</div>
      <div class="dy-fx-9">
        <input type="text" class="form-control" v-model="params.themeInfo.theme" />
      </div>
    </div>
    <div class="dy-flex line-height-34 mt-10">
      <div class="dy-fx-1"><span class="required">*</span>线索来源:</div>
      <div class="dy-fx-9">
        <hl-select width="100%" :data="sourceData" v-model="selectedSource" type="primary" @on-change="handleSourceChange"></hl-select>
      </div>
    </div>
    <div class="dy-flex line-height-34 mt-10">
      <div class="dy-fx-1"><span class="required">*</span>渠道分类:</div>
      <div class="dy-fx-3">
        <hl-select width="100%" :data="channelTypeData" v-model="selectedChannelType" type="primary" @on-change="handleChannelTypeChange"></hl-select>
      </div>
      <div class="dy-fx-2"></div>

      <div class="dy-fx-1">渠道名称:</div>
      <div class="dy-fx-3">
        <hl-select width="100%" :data="channelNameData" v-model="selectedChannelName" type="primary" @on-change="handleChannelNameChange"></hl-select>
      </div>
    </div>

  </div>
  <div class="dy-flex line-height-34 mt-10">
    <div class="dy-fx-1"><span style="color:#fff;">*</span>详细描述:</div>
    <div class="dy-fx-9">
      <textarea class="form-control" rows="4" v-model="params.themeInfo.description"></textarea>
    </div>
  </div>
  </div>
  <div class="mt-15 pt-10">
    <div class="font-14 color-gray">客户信息</div>
    <div class="dy-flex line-height-34 mt-10">
      <div class="dy-fx-1"><span class="required">*</span>客户名称:</div>
      <div class="dy-fx-3">
        <input type="text" class="form-control" v-model="params.zlfInfo.customerName" />
      </div>
      <div class="dy-fx-2"></div>
      <div class="dy-fx-1"><span class="required">*</span>客户类型:</div>
      <div class="dy-fx-3">
        <ul class="cr-type-select clearfix">
          <li v-for="item in type" @click="selectedCustomerType(item.code)" :class="{active: item.code == params.zlfInfo.customerType}">{{item.name}}</li>
        </ul>
      </div>
    </div>
    <div class="dy-flex line-height-34 mt-10">
      <div class="dy-fx-1">
        <span v-if="params.zlfInfo.customerType == 'QY'"><span style="color:#fff;">*</span>纳税人识别号:</span>
        <span v-if="params.zlfInfo.customerType == 'PE'"><span style="color:#fff;">*</span>身份证号:</span>
      </div>
      <div class="dy-fx-3">
        <input type="text" class="form-control" v-model="params.zlfInfo.idcode" />
      </div>
      <div class="dy-fx-2"></div>
      <div class="dy-fx-1"><span style="color:#fff;">*</span>所属行业:</div>
      <div class="dy-fx-3">
        <hl-select width="100%" :data="industryData" v-model="selectedIndustry" type="primary" @on-change="handleIndustryChange"></hl-select>
      </div>
    </div>
    <div class="dy-flex line-height-34 mt-10">
      <div class="dy-fx-1"><span class="required">*</span>联系人:</div>
      <div class="dy-fx-3">
        <input type="text" class="form-control inline mr-5" style="width:120px;" v-model="params.zlfInfo.lperson" />
        <input type="text" class="form-control inline" style="width:158px;" placeholder="联系电话" v-model="params.zlfInfo.phone" />
      </div>
      <div class="dy-fx-2"></div>
      <div class="dy-fx-1"><span style="color:#fff;">*</span>邮箱:</div>
      <div class="dy-fx-3">
        <input type="text" class="form-control" v-model="params.zlfInfo.email" />
      </div>
    </div>
    <div class="dy-flex line-height-34 mt-10">
      <div class="dy-fx-1"><span style="color:#fff;">*</span>通讯地址:</div>
      <div class="dy-fx-5">
        <input type="text" class="form-control" v-model="params.zlfInfo.customerAddress" />
      </div>
      <div class="dy-fx-1"></div>
      <div class="dy-fx-1"><span style="color:#fff;">*</span>邮编:</div>
      <div class="dy-fx-2">
        <input type="text" class="form-control" v-model="params.zlfInfo.zipcode" />
      </div>
    </div>
    <div class="mtb-10">
      <hl-button type="primary" @on-click="validataCustomer">保存</hl-button>
    </div>
  </div>

  <!-- //验证客户 -->
  <div class="validata-customer" v-if="validataflag">
    <div class="validata-control">
      <div class="close cursor" @click="hidePopValidata">x</div>
      <h3>重复线索</h3>
      <p>同一客户下已存在线索，确认继续保存此线索</p>
      <div class="dy-flex">
        <div class="dy-fx-1 blue-button cursor" @click="addBusiness">确认</div>
        <div class="dy-fx-1 gray-button cursor" @click="hidePopValidata">取消</div>
      </div>
    </div>
  </div>
</section>

<script src="modules/rent/scripts/businessEdit.js" charset="utf-8"></script>
